this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-query"]=function(e){function t(t){for(var o,a,s=t[0],i=t[1],l=t[2],d=0,b=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&b.push(r[a][0]),r[a]=0;for(o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o]);for(u&&u(t);b.length;)b.shift()();return n.push.apply(n,l||[]),c()}function c(){for(var e,t=0;t<n.length;t++){for(var c=n[t],o=!0,s=1;s<c.length;s++){var i=c[s];0!==r[i]&&(o=!1)}o&&(n.splice(t--,1),e=a(a.s=c[0]))}return e}var o={},r={36:0,3:0},n=[];function a(t){if(o[t])return o[t].exports;var c=o[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.m=e,a.c=o,a.d=function(e,t,c){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)a.d(c,o,function(t){return e[t]}.bind(null,o));return c},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=t,s=s.slice();for(var l=0;l<s.length;l++)t(s[l]);var u=i;return n.push([531,0]),c()}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){e.exports=window.wp.htmlEntities},102:function(e,t,c){"use strict";c.d(t,"a",(function(){return h}));var o=c(0),r=c(1),n=c(2),a=c(70),s=c(614),i=c(4),l=c.n(i),u=c(11),d=c(16),b=c(35),m=c(613),p=c(10);c(55);const g=({id:e,label:t,popoverContents:c,remove:s,screenReaderLabel:i,className:d=""})=>{const[b,O]=Object(o.useState)(!1),j=Object(u.useInstanceId)(g);if(i=i||t,!t)return null;t=Object(p.decodeEntities)(t);const f=l()("woocommerce-tag",d,{"has-remove":!!s}),_=`woocommerce-tag__label-${j}`,w=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},i),Object(o.createElement)("span",{"aria-hidden":"true"},t));return Object(o.createElement)("span",{className:f},c?Object(o.createElement)(n.Button,{className:"woocommerce-tag__text",id:_,onClick:()=>O(!0)},w):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:_},w),c&&b&&Object(o.createElement)(n.Popover,{onClose:()=>O(!1)},c),s&&Object(o.createElement)(n.Button,{className:"woocommerce-tag__remove",onClick:s(e),label:Object(r.sprintf)(
// Translators: %s label.
Object(r.__)("Remove %s","woocommerce"),t),"aria-describedby":_},Object(o.createElement)(a.a,{icon:m.a,size:20,className:"clear-icon"})))};var O=g;c(54);const j=e=>Object(o.createElement)(b.b,{...e}),f=e=>{const{list:t,selected:c,renderItem:r,depth:n=0,onSelect:a,instanceId:s,isSingle:i,search:l,useExpandedPanelId:u}=e,[d]=u;return t?Object(o.createElement)(o.Fragment,null,t.map((t=>{var b,m;const p=null!==(b=t.children)&&void 0!==b&&b.length&&!i?t.children.every((({id:e})=>c.find((t=>t.id===e)))):!!c.find((({id:e})=>e===t.id)),g=(null===(m=t.children)||void 0===m?void 0:m.length)&&d===t.id;return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:p,onSelect:a,isSingle:i,selected:c,search:l,depth:n,useExpandedPanelId:u,controlId:s})),g?Object(o.createElement)(f,{...e,list:t.children,depth:n+1}):null)}))):null},_=({isLoading:e,isSingle:t,selected:c,messages:a,onChange:s,onRemove:i})=>{if(e||t||!c)return null;const l=c.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,a.selected(l)),l>0?Object(o.createElement)(n.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":a.clear},Object(r.__)("Clear all","woocommerce")):null),l>0?Object(o.createElement)("ul",null,c.map(((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:i}))))):null)},w=({filteredList:e,search:t,onSelect:c,instanceId:n,useExpandedPanelId:i,...l})=>{const{messages:u,renderItem:d,selected:b,isSingle:m}=l,p=d||j;return 0===e.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(a.a,{icon:s.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},t?Object(r.sprintf)(u.noResults,t):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(f,{useExpandedPanelId:i,list:e,selected:b,renderItem:p,onSelect:c,instanceId:n,isSingle:m,search:t}))},h=e=>{const{className:t="",isCompact:c,isHierarchical:a,isLoading:s,isSingle:i,list:b,messages:m=d.a,onChange:p,onSearch:g,selected:O,type:j="text",debouncedSpeak:f}=e,[k,y]=Object(o.useState)(""),v=Object(o.useState)(-1),E=Object(u.useInstanceId)(h),S=Object(o.useMemo)((()=>({...d.a,...m})),[m]),C=Object(o.useMemo)((()=>Object(d.c)(b,k,a)),[b,k,a]);Object(o.useEffect)((()=>{f&&f(S.updated)}),[f,S]),Object(o.useEffect)((()=>{"function"==typeof g&&g(k)}),[k,g]);const x=Object(o.useCallback)((e=>()=>{i&&p([]);const t=O.findIndex((({id:t})=>t===e));p([...O.slice(0,t),...O.slice(t+1)])}),[i,O,p]),N=Object(o.useCallback)((e=>()=>{Array.isArray(e)?p(e):-1===O.findIndex((({id:t})=>t===e.id))?p(i?[e]:[...O,e]):x(e.id)()}),[i,x,p,O]),P=Object(o.useCallback)((e=>{const[t]=O.filter((t=>!e.find((e=>t.id===e.id))));x(t.id)()}),[x,O]);return Object(o.createElement)("div",{className:l()("woocommerce-search-list",t,{"is-compact":c,"is-loading":s,"is-token":"token"===j})},"text"===j&&Object(o.createElement)(_,{...e,onRemove:x,messages:S}),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},"text"===j?Object(o.createElement)(n.TextControl,{label:S.search,type:"search",value:k,onChange:e=>y(e)}):Object(o.createElement)(n.FormTokenField,{disabled:s,label:S.search,onChange:P,onInputChange:e=>y(e),suggestions:[],__experimentalValidateInput:()=>!1,value:s?[Object(r.__)("Loading…","woocommerce")]:O.map((e=>({...e,value:e.name}))),__experimentalShowHowTo:!1})),s?Object(o.createElement)("div",{className:"woocommerce-search-list__list"},Object(o.createElement)(n.Spinner,null)):Object(o.createElement)(w,{...e,search:k,filteredList:C,messages:S,onSelect:N,instanceId:E,useExpandedPanelId:v}))};Object(n.withSpokenMessages)(h)},103:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);function r(e,t){const c=Object(o.useRef)();return Object(o.useEffect)((()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)}),[e,t]),c.current}},11:function(e,t){e.exports=window.wp.compose},117:function(e,t,c){"use strict";c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l}));var o=c(0),r=c(2),n=c(1),a=c(349),s=c(76);const i="core/post-template",l="woocommerce/product-query/product-template";Object(s.a)(i,{blockDescription:Object(n.__)("Contains the block elements used to render a product, like its name, featured image, rating, and more.","woocommerce"),blockIcon:Object(o.createElement)(r.Icon,{icon:a.a}),blockTitle:Object(n.__)("Product template","woocommerce"),variationName:l})},14:function(e,t){e.exports=window.wp.apiFetch},140:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"c",(function(){return u})),c.d(t,"b",(function(){return d}));var o=c(0),r=c(1),n=c(70),a=c(275),s=c(211);c(192);const i=({text:e,title:t=Object(r.__)("Feedback?","woocommerce"),url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"})=>{const[i,l]=Object(o.useState)(!1);return Object(o.useEffect)((()=>{l(!0)}),[]),Object(o.createElement)(o.Fragment,null,i&&Object(o.createElement)("div",{className:"wc-block-feedback-prompt"},Object(o.createElement)(n.a,{icon:a.a}),Object(o.createElement)("h2",{className:"wc-block-feedback-prompt__title"},t),Object(o.createElement)("p",{className:"wc-block-feedback-prompt__text"},e),Object(o.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(r.__)("Give us your feedback.","woocommerce"),Object(o.createElement)(n.a,{icon:s.a,size:16}))))},l=()=>Object(o.createElement)(i,{text:Object(r.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woocommerce"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"}),u=()=>Object(o.createElement)(i,{text:Object(r.__)("Thanks for trying out the Products block! Help us make it better by sharing your feedback.","woocommerce"),title:Object(r.__)("Share your feedback!","woocommerce"),url:"https://airtable.com/shrFX5FAqmCY6hVYI"}),d=()=>Object(o.createElement)(i,{text:Object(r.__)("Thanks for trying out the Product Collection block! Help us make it better by sharing your feedback.","woocommerce"),title:Object(r.__)("Share your feedback!","woocommerce"),url:"https://airtable.com/shrqsMSDPvAKoY99u"})},142:function(e,t,c){"use strict";c.d(t,"b",(function(){return r})),c.d(t,"c",(function(){return n})),c.d(t,"a",(function(){return s}));var o=c(21);const r=e=>Object(o.c)(e,"count")&&Object(o.c)(e,"description")&&Object(o.c)(e,"id")&&Object(o.c)(e,"name")&&Object(o.c)(e,"parent")&&Object(o.c)(e,"slug")&&"number"==typeof e.count&&"string"==typeof e.description&&"number"==typeof e.id&&"string"==typeof e.name&&"number"==typeof e.parent&&"string"==typeof e.slug,n=e=>Array.isArray(e)&&e.every(r),a=e=>Object(o.c)(e,"attribute")&&Object(o.c)(e,"operator")&&Object(o.c)(e,"slug")&&"string"==typeof e.attribute&&"string"==typeof e.operator&&Array.isArray(e.slug)&&e.slug.every((e=>"string"==typeof e)),s=e=>Array.isArray(e)&&e.every(a)},147:function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),a=c(1),s=c(35),i=c(102),l=c(2),u=c(11),d=c(23),b=c(28),m=c(34),p=c(73),g=c(157);c(233),t.a=Object(u.withInstanceId)((({onChange:e,onOperatorChange:t,instanceId:c,isCompact:r=!1,messages:u={},operator:O="any",selected:j,type:f="text"})=>{const{errorLoadingAttributes:_,isLoadingAttributes:w,productsAttributes:h}=function(e){const[t,c]=Object(o.useState)(null),[r,n]=Object(o.useState)(!1),[a,s]=Object(o.useState)([]),i=Object(o.useRef)(!1);return Object(o.useEffect)((()=>{if(!r&&!i.current)return async function(){n(!0);try{const e=await Object(d.b)(),t=[];for(const c of e){const e=await Object(d.i)(c.id);t.push({...c,parent:0,terms:e.map((e=>({...e,attr_slug:c.taxonomy,parent:c.id})))})}s(t),i.current=!0}catch(e){e instanceof Error&&c(await Object(b.a)(e))}finally{n(!1)}}(),()=>{i.current=!0}}),[r,true]),{errorLoadingAttributes:t,isLoadingAttributes:r,productsAttributes:a}}(),k=h.reduce(((e,t)=>{const{terms:c,...o}=t;return[...e,Object(g.a)(o),...c.map(g.a)]}),[]);return u={clear:Object(a.__)("Clear all product attributes","woocommerce"),noItems:Object(a.__)("Your store doesn't have any product attributes.","woocommerce"),search:Object(a.__)("Search for product attributes","woocommerce"),selected:e=>Object(a.sprintf)(/* translators: %d is the count of attributes selected. */
Object(a._n)("%d attribute selected","%d attributes selected",e,"woocommerce"),e),updated:Object(a.__)("Product attribute search results updated.","woocommerce"),...u},_?Object(o.createElement)(m.a,{error:_}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{className:"woocommerce-product-attributes",isCompact:r,isHierarchical:!0,isLoading:w,isSingle:!1,list:k,messages:u,onChange:e,renderItem:e=>{const{item:t,search:r,depth:i=0}=e,l=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":r.length>0,"is-skip-level":0===i&&0!==t.parent}];if(!t.breadcrumbs.length)return Object(o.createElement)(p.a,{...e,className:n()(l),item:t,isLoading:w,disabled:0===t.count,name:`attributes-${c}`,countLabel:Object(a.sprintf)(/* translators: %d is the count of terms. */
Object(a._n)("%d term","%d terms",t.count,"woocommerce"),t.count),"aria-label":Object(a.sprintf)(/* translators: %1$s is the item name, %2$d is the count of terms for the item. */
Object(a._n)("%1$s, has %2$d term","%1$s, has %2$d terms",t.count,"woocommerce"),t.name,t.count)});const u=`${t.breadcrumbs[0]}: ${t.name}`;return Object(o.createElement)(s.a,{...e,name:`terms-${c}`,className:n()(...l,"has-count"),countLabel:Object(a.sprintf)(/* translators: %d is the count of products. */
Object(a._n)("%d product","%d products",t.count,"woocommerce"),t.count),"aria-label":Object(a.sprintf)(/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */
Object(a._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woocommerce"),u,t.count)})},selected:j.map((({id:e})=>k.find((t=>t.id===e)))).filter(Boolean),type:f}),!!t&&Object(o.createElement)("div",{hidden:j.length<2},Object(o.createElement)(l.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(a.__)("Display products matching","woocommerce"),help:Object(a.__)("Pick at least two attributes to use this setting.","woocommerce"),value:O,onChange:t,options:[{label:Object(a.__)("Any selected attributes","woocommerce"),value:"any"},{label:Object(a.__)("All selected attributes","woocommerce"),value:"all"}]})))}))},15:function(e,t){e.exports=window.wp.url},151:function(e,t,c){"use strict";c.d(t,"c",(function(){return l})),c.d(t,"b",(function(){return u})),c.d(t,"a",(function(){return d})),c.d(t,"d",(function(){return b}));var o=c(3),r=c(6),n=c(80);const a=e=>"core/query"===e.name&&"woocommerce/product-query"===e.attributes.namespace,s=e=>"woocommerce/product-collection"===e.name,i=(e,t)=>{let c=[];return e.forEach((e=>{t(e)&&(c=[...c,e.clientId]),c=[...c,...i(e.innerBlocks,t)]})),c},l=e=>i(e,a),u=e=>i(e,s),d=(e,t)=>{const c=Object(r.select)("core/block-editor").getBlockRootClientId(e)||void 0;return Object(r.select)("core/block-editor").canInsertBlockType(t,c)},b=Object(o.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,n.a)},157:function(e,t,c){"use strict";c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return l})),c.d(t,"d",(function(){return u}));var o=c(3),r=c(142),n=c(6);const a=Object(o.getSetting)("attributes",[]).reduce(((e,t)=>{const c=(o=t)&&o.attribute_name?{id:parseInt(o.attribute_id,10),name:o.attribute_name,taxonomy:"pa_"+o.attribute_name,label:o.attribute_label}:null;var o;return c&&c.id&&e.push(c),e}),[]),s=e=>{const{count:t,id:c,name:o,parent:n}=e;return{count:t,id:c,name:o,parent:n,breadcrumbs:[],children:[],value:Object(r.b)(e)?e.attr_slug:""}},i=e=>{if(e)return a.find((t=>t.id===e))},l=e=>{if(e)return a.find((t=>t.taxonomy===e))},u=(e,t,c,o)=>{const r=Object(n.select)("core/block-editor"),a=Object(n.dispatch)("core/block-editor"),s=r.getBlockParents(e);let i="";s.forEach((e=>{const t=r.getBlock(e).innerBlocks.find((e=>e.name===o));t&&(i=t.clientId)})),a.updateBlockAttributes(i,{[t]:c})}},16:function(e,t,c){"use strict";c.d(t,"a",(function(){return a})),c.d(t,"c",(function(){return i})),c.d(t,"d",(function(){return l})),c.d(t,"b",(function(){return u}));var o=c(0),r=c(1),n=c(57);const a={clear:Object(r.__)("Clear all selected items","woocommerce"),noItems:Object(r.__)("No items found.","woocommerce"),
/* Translators: %s search term */
noResults:Object(r.__)("No results for %s","woocommerce"),search:Object(r.__)("Search for items","woocommerce"),selected:e=>Object(r.sprintf)(/* translators: Number of items selected from list. */
Object(r._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:Object(r.__)("Search results updated.","woocommerce")},s=(e,t=e)=>{const c=e.reduce(((e,t)=>{const c=t.parent||0;return e[c]||(e[c]=[]),e[c].push(t),e}),{}),o=Object(n.a)(t,"id"),r=["0"],a=(e={})=>e.parent?[...a(o[e.parent]),e.name]:e.name?[e.name]:[],s=e=>e.map((e=>{const t=c[e.id];return r.push(""+e.id),{...e,breadcrumbs:a(o[e.parent]),children:t&&t.length?s(t):[]}})),i=s(c[0]||[]);return Object.entries(c).forEach((([e,t])=>{r.includes(e)||i.push(...s(t||[]))})),i},i=(e,t,c)=>{if(!t)return c?s(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),r=e.map((e=>!!o.test(e.name)&&e)).filter(Boolean);return c?s(r,e):r},l=(e,t)=>{if(!t)return e;const c=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(c).map(((e,t)=>c.test(e)?Object(o.createElement)("strong",{key:t},e):Object(o.createElement)(o.Fragment,{key:t},e)))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},17:function(e,t,c){"use strict";c.d(t,"p",(function(){return n})),c.d(t,"n",(function(){return a})),c.d(t,"m",(function(){return s})),c.d(t,"o",(function(){return i})),c.d(t,"k",(function(){return l})),c.d(t,"e",(function(){return u})),c.d(t,"h",(function(){return d})),c.d(t,"l",(function(){return b})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return p})),c.d(t,"g",(function(){return g})),c.d(t,"a",(function(){return f})),c.d(t,"b",(function(){return _})),c.d(t,"i",(function(){return w})),c.d(t,"j",(function(){return h})),c.d(t,"f",(function(){return k}));var o,r=c(3);const n=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",i=n.buildPhase,l=null===(o=r.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=r.STORE_PAGES.checkout.id,d=(r.STORE_PAGES.checkout.permalink,r.STORE_PAGES.privacy.permalink),b=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),m=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),p=r.STORE_PAGES.cart.permalink,g=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("localPickupEnabled",!1)),O=Object(r.getSetting)("countries",{}),j=Object(r.getSetting)("countryData",{}),f=Object.fromEntries(Object.keys(j).filter((e=>!0===j[e].allowBilling)).map((e=>[e,O[e]||""]))),_=Object.fromEntries(Object.keys(j).filter((e=>!0===j[e].allowBilling)).map((e=>[e,j[e].states||[]]))),w=Object.fromEntries(Object.keys(j).filter((e=>!0===j[e].allowShipping)).map((e=>[e,O[e]||""]))),h=Object.fromEntries(Object.keys(j).filter((e=>!0===j[e].allowShipping)).map((e=>[e,j[e].states||[]]))),k=Object.fromEntries(Object.keys(j).map((e=>[e,j[e].locale||[]])))},174:function(e,t,c){"use strict";c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l}));var o=c(0),r=c(2),n=c(87),a=c(198),s=c(76);const i="core/post-excerpt",l="woocommerce/product-query/product-summary";Object(s.a)(i,{blockDescription:n.a,blockIcon:Object(o.createElement)(r.Icon,{icon:a.a}),blockTitle:n.c,variationName:l})},192:function(e,t){},2:function(e,t){e.exports=window.wp.components},207:function(e,t,c){"use strict";function o(e,t){const{[t]:c,...o}=e;return o}c.d(t,"a",(function(){return o}))},21:function(e,t,c){"use strict";c.d(t,"b",(function(){return r})),c.d(t,"c",(function(){return n})),c.d(t,"a",(function(){return a}));var o=c(42);const r=e=>!Object(o.a)(e)&&e instanceof Object&&e.constructor===Object;function n(e,t){return r(e)&&t in e}const a=e=>0===Object.keys(e).length},23:function(e,t,c){"use strict";c.d(t,"h",(function(){return l})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return m})),c.d(t,"c",(function(){return p})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return O})),c.d(t,"a",(function(){return j}));var o=c(15),r=c(14),n=c.n(r),a=c(3),s=c(17);const i=(e,t)=>{const c=new Map;return e.filter((e=>{const o=t(e);return!c.has(o)&&(c.set(o,e),!0)}))},l=({selected:e=[],search:t="",queryArgs:c={}})=>{const r=(({selected:e=[],search:t="",queryArgs:c={}})=>{const r=s.p.productCount>100,n={per_page:r?100:0,catalog_visibility:"any",search:t,orderby:"title",order:"asc"},a=[Object(o.addQueryArgs)("/wc/store/v1/products",{...n,...c})];return r&&e.length&&a.push(Object(o.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:0})),a})({selected:e,search:t,queryArgs:c});return Promise.all(r.map((e=>n()({path:e})))).then((e=>{const t=e.flat();return i(t,(e=>e.id)).map((e=>({...e,parent:0})))})).catch((e=>{throw e}))},u=e=>n()({path:`/wc/store/v1/products/${e}`}),d=()=>n()({path:"wc/store/v1/products/attributes"}),b=e=>n()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=({selected:e=[],search:t})=>{const c=(({selected:e=[],search:t})=>{const c=Object(a.getSetting)("limitTags",!1),r=[Object(o.addQueryArgs)("wc/store/v1/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:t})];return c&&e.length&&r.push(Object(o.addQueryArgs)("wc/store/v1/products/tags",{include:e})),r})({selected:e,search:t});return Promise.all(c.map((e=>n()({path:e})))).then((e=>{const t=e.flat();return i(t,(e=>e.id))}))},p=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),g=e=>n()({path:`wc/store/v1/products/categories/${e}`}),O=e=>n()({path:Object(o.addQueryArgs)("wc/store/v1/products",{per_page:0,type:"variation",parent:e})}),j=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter((t=>t.title.raw===e.title.raw)).length;return e.title.raw+(c?"":` - ${e.slug}`)}},231:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(21);const r=e=>{if(Object(o.b)(e)){const t=e.getEditedPostType();return"wp_template"===t||"wp_template_part"===t}return!1}},233:function(e,t){},263:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(84),r=c(7),n=c(6);const a=new Set,s=({blockName:e,blockMetadata:t,blockSettings:c,isVariationBlock:s=!1,variationName:i,isAvailableOnPostEditor:l})=>{let u="";Object(n.subscribe)((()=>{var a;const l=u,d=Object(n.select)("core/edit-site");u=function(e){const t=Object(o.a)(e)?void 0:e;return null==t?void 0:t.split("//")[1]}(null==d?void 0:d.getEditedPostId());const b=l!==u,m=Boolean(u);if(!b||!m||!e)return;let p=Boolean(Object(r.getBlockType)(e));var g,O;p&&(null!==(a=u)&&void 0!==a&&a.includes("single-product")||null!=l&&l.includes("single-product"))&&(s&&i?Object(r.unregisterBlockVariation)(e,i):Object(r.unregisterBlockType)(e),p=!1),p||(s?Object(r.registerBlockVariation)(e,{...c,ancestor:null!==(g=u)&&void 0!==g&&g.includes("single-product")||null==c?void 0:c.ancestor}):Object(r.registerBlockType)(t,{...c,ancestor:null!==(O=u)&&void 0!==O&&O.includes("single-product")||null==c?void 0:c.ancestor}))}),"core/edit-site"),Object(n.subscribe)((()=>{!(Boolean(i)?a.has(i):a.has(e))&&l&&(s?(a.add(i),Object(r.registerBlockVariation)(e,c)):(a.add(e),Object(r.registerBlockType)(t,c)))}),"core/edit-post")}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}}},3:function(e,t){e.exports=window.wc.wcSettings},31:function(e,t){e.exports=window.wp.escapeHtml},331:function(e,t,c){"use strict";var o=c(0),r=c(9);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 19.375L4.5 7.625C4.5 7.55596 4.55596 7.5 4.625 7.5L16.375 7.5C16.444 7.5 16.5 7.55596 16.5 7.625L16.5 19.375C16.5 19.444 16.444 19.5 16.375 19.5L4.625 19.5C4.55596 19.5 4.5 19.444 4.5 19.375ZM4.625 21C3.72754 21 3 20.2725 3 19.375L3 7.625C3 6.72754 3.72754 6 4.625 6L16.375 6C17.2725 6 18 6.72754 18 7.625L18 19.375C18 20.2725 17.2725 21 16.375 21L4.625 21ZM19 3.75L8 3.75L8 2.25L19 2.25C20.5183 2.25 21.75 3.4796 21.75 4.99891L21.75 18L20.25 18L20.25 4.99891C20.25 4.30909 19.6909 3.75 19 3.75Z"}));t.a=n},34:function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(31);t.a=({error:e})=>Object(o.createElement)("div",{className:"wc-block-error-message"},(({message:e,type:t})=>e?"general"===t?Object(o.createElement)("span",null,Object(r.__)("The following error was returned","woocommerce"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(e))):"api"===t?Object(o.createElement)("span",null,Object(r.__)("The following error was returned from the API","woocommerce"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(e))):e:Object(r.__)("An error has prevented the block from being updated.","woocommerce"))(e))},35:function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var o=c(0),r=c(4),n=c.n(r),a=c(2);function s(e,t,c){const o=new Set(t.map((e=>e[c])));return e.filter((e=>!o.has(e[c])))}var i=c(10),l=c(16);const u=({label:e})=>Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},e),d=e=>{const{item:t,search:c}=e,r=t.breadcrumbs&&t.breadcrumbs.length;return Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},r?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(t.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(Object(i.decodeEntities)(t.name),c)))},b=({countLabel:e,className:t,depth:c=0,controlId:r="",item:b,isSelected:m,isSingle:p,onSelect:g,search:O="",selected:j,useExpandedPanelId:f,..._})=>{var w,h;const[k,y]=f,v=null!=e&&void 0!==b.count&&null!==b.count,E=!(null===(w=b.breadcrumbs)||void 0===w||!w.length),S=!(null===(h=b.children)||void 0===h||!h.length),C=k===b.id,x=n()(["woocommerce-search-list__item",`depth-${c}`,t],{"has-breadcrumbs":E,"has-children":S,"has-count":v,"is-expanded":C,"is-radio-button":p}),N=_.name||`search-list-item-${r}`,P=`${N}-${b.id}`,A=Object(o.useCallback)((()=>{y(C?-1:Number(b.id))}),[C,b.id,y]);return S?Object(o.createElement)("div",{className:x,onClick:A,onKeyDown:e=>"Enter"===e.key||" "===e.key?A():null,role:"treeitem",tabIndex:0},p?Object(o.createElement)(o.Fragment,null,Object(o.createElement)("input",{type:"radio",id:P,name:N,value:b.value,onChange:g(b),onClick:e=>e.stopPropagation(),checked:m,className:"woocommerce-search-list__item-input",..._}),Object(o.createElement)(d,{item:b,search:O}),v?Object(o.createElement)(u,{label:e||b.count}):null):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:m,...!m&&b.children.some((e=>j.find((t=>t.id===e.id))))?{indeterminate:!0}:{},label:Object(l.d)(Object(i.decodeEntities)(b.name),O),onChange:()=>{m?g(s(j,b.children,"id"))():g(function(e,t,c){const o=s(t,e,"id");return[...e,...o]}(j,b.children))()},onClick:e=>e.stopPropagation()}),v?Object(o.createElement)(u,{label:e||b.count}):null)):Object(o.createElement)("label",{htmlFor:P,className:x},p?Object(o.createElement)(o.Fragment,null,Object(o.createElement)("input",{type:"radio",id:P,name:N,value:b.value,onChange:g(b),checked:m,className:"woocommerce-search-list__item-input",..._}),Object(o.createElement)(d,{item:b,search:O})):Object(o.createElement)(a.CheckboxControl,{id:P,name:N,className:"woocommerce-search-list__item-input",value:Object(i.decodeEntities)(b.value),label:Object(l.d)(Object(i.decodeEntities)(b.name),O),onChange:g(b),checked:m,..._}),v?Object(o.createElement)(u,{label:e||b.count}):null)};t.b=b},368:function(e,t,c){"use strict";c.d(t,"a",(function(){return p})),c.d(t,"b",(function(){return O}));var o=c(0),r=c(2),n=c(1),a=c(331),s=c(263),i=c(3),l=c(80),u=c(44),d=c(117),b=c(89);const m="woocommerce/related-products",p={namespace:m,allowedControls:[],displayLayout:{type:"flex",columns:5},query:{perPage:5,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1},lock:{remove:!0,move:!0}},g=Object(i.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,l.a),O=[["core/heading",{level:2,content:Object(n.__)("Related products","woocommerce")}],["core/post-template",{__woocommerceNamespace:d.b,...g&&{layout:{type:"grid",columnCount:3}}},[["woocommerce/product-image",{productId:0,imageSizing:"cropped"}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",isLink:!0,__woocommerceNamespace:b.b},[]],["woocommerce/product-price",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]],["woocommerce/product-button",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]]]]];Object(s.a)({blockName:u.i,blockMetadata:{},blockSettings:{description:Object(n.__)("Display related products.","woocommerce"),name:"Related Products Controls",title:Object(n.__)("Related Products Controls","woocommerce"),isActive:e=>e.namespace===m,icon:Object(o.createElement)(r.Icon,{icon:a.a,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:p,allowedControls:[],innerBlocks:O,scope:["block"]},isVariationBlock:!0,variationName:m})},42:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>null===e},43:function(e,t){e.exports=window.wp.hooks},44:function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"f",(function(){return u})),c.d(t,"g",(function(){return d})),c.d(t,"d",(function(){return b})),c.d(t,"i",(function(){return m})),c.d(t,"a",(function(){return p})),c.d(t,"c",(function(){return g})),c.d(t,"j",(function(){return O})),c.d(t,"h",(function(){return f})),c.d(t,"e",(function(){return w}));var o=c(3),r=c(207),n=c(80),a=c(89),s=c(117),i=c(60);const l=!1,u=!1,d="woocommerce/product-query",b="/wp-admin/edit.php?post_type=product&page=product_attributes",m="core/query",p=["attributes","presets","productSelector","onSale","stockStatus","wooInherit"],g=["taxQuery","search",...p],O=Object(o.getSetting)("stockStatusOptions",[]),j=Object(o.getSetting)("hideOutOfStockItems",!1),f={allowedControls:g,displayLayout:{type:"flex",columns:3},query:{perPage:9,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1,__woocommerceAttributes:[],__woocommerceStockStatus:j?Object.keys(Object(r.a)(O,"outofstock")):Object.keys(O)}},_=Object(o.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,n.a),w=[["core/post-template",{__woocommerceNamespace:s.b,className:"products-block-post-template",..._&&{layout:{type:"grid",columnCount:3}}},[["woocommerce/product-image",{imageSizing:i.a.THUMBNAIL}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",style:{spacing:{margin:{bottom:"0.75rem",top:"0"}}},isLink:!0,__woocommerceNamespace:a.b}],["woocommerce/product-price",{textAlign:"center",fontSize:"small"}],["woocommerce/product-button",{textAlign:"center",fontSize:"small"}]]],["core/query-pagination",{layout:{type:"flex",justifyContent:"center"}}],["core/query-no-results"]]},5:function(e,t){e.exports=window.wp.blockEditor},531:function(e,t,c){e.exports=c(565)},532:function(e,t){},533:function(e,t){},54:function(e,t){},55:function(e,t){},565:function(e,t,c){"use strict";c.r(t);var o=c(43),r=c(3),n=c(89),a=c(174),s=c(117),i=c(0),l=c(1),u=c(5),d=c(6),b=c(140),m=c(84),p=c(103),g=c(2),O=c(7),j=c(231),f=c(44);let _=function(e){return e.PRODUCT_QUERY="woocommerce/product-query",e.RELATED_PRODUCTS="woocommerce/related-products",e}({});function w(e,t){const{query:c}=e.attributes;e.setAttributes({query:{...c,...t}})}var h=c(147);const k=[{key:"title/asc",name:Object(l.__)("Sorted by title","woocommerce")},{key:"date/desc",name:Object(l.__)("Newest","woocommerce")},{key:"popularity/desc",name:Object(l.__)("Best Selling","woocommerce")},{key:"rating/desc",name:Object(l.__)("Top Rated","woocommerce")}];function y(e){const{query:t}=e.attributes;return Object(i.createElement)(g.PanelBody,{className:"woocommerce-product-query-panel__sort",title:Object(l.__)("Popular Filters","woocommerce"),initialOpen:!0},Object(i.createElement)("p",null,Object(l.__)("Arrange products by popular pre-sets.","woocommerce")),Object(i.createElement)(g.CustomSelectControl,{hideLabelFromVision:!0,label:Object(l.__)("Choose among these pre-sets","woocommerce"),onChange:t=>{var c,o,r;if(null===(c=t.selectedItem)||void 0===c||!c.key)return;const[n,a]=null===(o=t.selectedItem)||void 0===o||null===(r=o.key)||void 0===r?void 0:r.split("/");w(e,{order:a,orderBy:n})},options:k,value:k.find((e=>e.key===`${t.orderBy}/${t.order}`))}))}var v=c(23),E=c(207);const S=e=>{const t=Object(i.createInterpolateElement)(Object(l.__)("Upgrade all Products (Beta) blocks on this page to <strongText /> for more features!","woocommerce"),{strongText:Object(i.createElement)("strong",null,Object(l.__)("Product Collection","woocommerce"))}),c=Object(l.__)("Upgrade to Product Collection","woocommerce");return Object(i.createElement)(g.Notice,{isDismissible:!1},Object(i.createElement)(i.Fragment,null,t),Object(i.createElement)("br",null),Object(i.createElement)("br",null),Object(i.createElement)(g.Button,{variant:"link",onClick:()=>{e.upgradeBlock()}},c))};var C=c(151);const x=({name:e,attributes:t})=>"core/post-template"===e&&"woocommerce/product-query/product-template"===t.__woocommerceNamespace,N=e=>"grid"===e?"flex":"default"===e?"list":"flex",P=e=>e.map((e=>{const{name:t,attributes:c}=e,o=P(e.innerBlocks);return x(e)?((e,t)=>{const{__woocommerceNamespace:c,className:o,layout:r,...n}=e.attributes;return Object(O.createBlock)("woocommerce/product-template",n,t)})(e,o):(({name:e,attributes:t})=>"core/post-title"===e&&"woocommerce/product-query/product-title"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:c,...o}=e.attributes;return Object(O.createBlock)("core/post-title",{__woocommerceNamespace:"woocommerce/product-collection/product-title",...o},t)})(e,o):(({name:e,attributes:t})=>"core/post-excerpt"===e&&"woocommerce/product-query/product-summary"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:c,...o}=e.attributes;return Object(O.createBlock)("core/post-excerpt",{__woocommerceNamespace:"woocommerce/product-collection/product-summary",...o},t)})(e,o):Object(O.createBlock)(t,c,o)})),A=e=>{const t=Object(d.select)("core/block-editor").getBlock(e),c=Object(C.a)(e,"woocommerce/product-collection");if(t&&c){const{attributes:c={},innerBlocks:o=[]}=t,r=((e,t)=>{const c=t.find(x),{layout:o}=(null==c?void 0:c.attributes)||{};return C.d?(e=>{const{type:t,columnCount:c}=e;return{type:N(t),columns:c}})(o):e.displayLayout})(c,o),n=(e=>{const{query:t,namespace:c,...o}=e,{__woocommerceAttributes:r,__woocommerceStockStatus:n,__woocommerceOnSale:a,include:s,...i}=t;return{...o,query:{woocommerceAttributes:r,woocommerceStockStatus:n,woocommerceOnSale:a,woocommerceHandPickedProducts:s,taxQuery:{},parents:[],isProductCollectionBlock:!0,...i},displayUpgradeNotice:!0}})({...c,displayLayout:r}),a=P(o),s=Object(O.createBlock)("woocommerce/product-collection",n,a);return Object(d.dispatch)("core/block-editor").replaceBlock(e,s),!0}return!1},I=e=>{if(0===Object(d.select)("core/block-editor").getGlobalBlockCount("core/query"))return;const t=Object(d.select)("core/block-editor").getBlocks(),c=Object(C.c)(t);if(0===c.length)return;const o=(e=>{const t=e.map(A);return!!t.length&&t.every((e=>!!e))})(c);e&&o&&e()};c(532);const B=f.a.map((e=>`__woocommerce${e[0].toUpperCase()}${e.slice(1)}`));function T(e){var t;const c="string"==typeof e?e:e.value;return null===(t=Object.entries(f.j).find((([,e])=>e===c)))||void 0===t?void 0:t[0]}const L={attributes:e=>{const{query:t}=e.attributes,[c,o]=Object(i.useState)([]);return Object(i.useEffect)((()=>{t.__woocommerceAttributes&&o(t.__woocommerceAttributes.map((({termId:e})=>({id:e}))))}),[t.__woocommerceAttributes]),Object(i.createElement)(g.__experimentalToolsPanelItem,{label:Object(l.__)("Product Attributes","woocommerce"),hasValue:()=>{var e;return null===(e=t.__woocommerceAttributes)||void 0===e?void 0:e.length}},Object(i.createElement)(h.a,{messages:{search:Object(l.__)("Attributes","woocommerce")},selected:c,onChange:t=>{const c=t.map((({id:e,value:t})=>({termId:e,taxonomy:t})));w(e,{__woocommerceAttributes:c})},operator:"any",isCompact:!0,type:"token"}),Object(i.createElement)(g.ExternalLink,{className:"woocommerce-product-query-panel__external-link",href:f.d},Object(l.__)("Manage attributes","woocommerce")))},onSale:e=>{const{query:t}=e.attributes;return Object(i.createElement)(g.__experimentalToolsPanelItem,{label:Object(l.__)("Sale status","woocommerce"),hasValue:()=>t.__woocommerceOnSale},Object(i.createElement)(g.ToggleControl,{label:Object(l.__)("Show only products on sale","woocommerce"),checked:t.__woocommerceOnSale||!1,onChange:t=>{w(e,{__woocommerceOnSale:t})}}))},productSelector:e=>{const{query:t}=e.attributes,c=function(){const[e,t]=Object(i.useState)([]);return Object(i.useEffect)((()=>{Object(v.h)({selected:[]}).then((e=>{t(e)}))}),[]),e}();return Object(i.createElement)(g.__experimentalToolsPanelItem,{label:Object(l.__)("Hand-picked Products","woocommerce"),hasValue:()=>{var e;return null===(e=t.include)||void 0===e?void 0:e.length}},Object(i.createElement)(g.FormTokenField,{disabled:!c.length,displayTransform:e=>{var t;return Number.isNaN(Number(e))?e:(null===(t=c.find((t=>t.id===Number(e))))||void 0===t?void 0:t.name)||""},label:Object(l.__)("Pick some products","woocommerce"),onChange:t=>{const o=t.map((e=>{var t;return null===(t=c.find((t=>t.name===e||t.id===Number(e))))||void 0===t?void 0:t.id})).filter(Boolean).map(String);if(!o.length&&e.attributes.query.include){const t=Object(E.a)(e.attributes.query,"include");w({...e,attributes:{...e.attributes,query:t}},{})}else w(e,{include:o})},suggestions:c.map((e=>e.name)),validateInput:e=>c.find((t=>t.name===e)),value:c.length?(null==t?void 0:t.include)||[]:[Object(l.__)("Loading…","woocommerce")],__experimentalExpandOnFocus:!0}))},stockStatus:e=>{var t;const{query:c}=e.attributes;return Object(i.createElement)(g.__experimentalToolsPanelItem,{label:Object(l.__)("Stock status","woocommerce"),hasValue:()=>c.__woocommerceStockStatus},Object(i.createElement)(g.FormTokenField,{label:Object(l.__)("Stock status","woocommerce"),onChange:t=>{const c=t.map(T).filter(Boolean);w(e,{__woocommerceStockStatus:c})},suggestions:Object.values(f.j),validateInput:e=>Object.values(f.j).includes(e),value:(null==c||null===(t=c.__woocommerceStockStatus)||void 0===t?void 0:t.map((e=>f.j[e])))||[],__experimentalExpandOnFocus:!0}))},wooInherit:e=>{const t=Object(p.a)(e.attributes.query,(e=>!1===e.inherit));return Object(i.createElement)(g.ToggleControl,{className:"woo-inherit-query-toggle",label:Object(l.__)("Inherit query from template","woocommerce"),help:Object(l.__)("Toggle to use the global query context that is set with the current template, such as variations of the product catalog or search. Disable to customize the filtering independently.","woocommerce"),checked:e.attributes.query.inherit||!1,onChange:c=>{const o={inherit:c};c&&(o.perPage=Object(r.getSettingWithCoercion)("loopShopPerPage",12,m.a)),w(e,{...e.defaultWooQueryParams,...o,...!1===c&&{...t}})}})}},q=e=>{const t=function(e){const t=Object(d.useSelect)("core/edit-site"),c=Object(d.useSelect)((t=>{var c;return null===(c=t(O.store).getActiveBlockVariation(f.i,e))||void 0===c?void 0:c.allowedControls}),[e]);return Object(j.a)(t)?function(e){return e.query.inherit}(e)?c.filter((e=>"wooInherit"===e)):c:c.filter((e=>"wooInherit"!==e))}(e.attributes),c=function(e){const t=Object(d.useSelect)((t=>{var c;return null===(c=t("core/blocks").getBlockVariations(f.i).find((t=>t.name===e)))||void 0===c?void 0:c.attributes}));return t?Object.assign({},...B.map((e=>({[e]:t.query[e]})))):{}}(e.attributes.namespace);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,f.f&&Object(i.createElement)(S,{upgradeBlock:I}),(null==t?void 0:t.includes("presets"))&&Object(i.createElement)(y,{...e}),Object(i.createElement)(g.__experimentalToolsPanel,{className:"woocommerce-product-query-toolspanel",label:Object(l.__)("Advanced Filters","woocommerce"),resetAll:()=>{w(e,c)}},Object.entries(L).map((([o,r])=>null!=t&&t.includes(o)?Object(i.createElement)(r,{...e,defaultWooQueryParams:c,key:o}):null)))))};if(Object(o.addFilter)("editor.BlockEdit",f.i,(e=>t=>{return(c=t).name===f.i&&Object.values(_).includes(c.attributes.namespace)?Object(i.createElement)(i.Fragment,null,Object(i.createElement)(q,{...t}),Object(i.createElement)(e,{...t}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(b.c,null))):Object(i.createElement)(e,{...t});var c})),Object(r.isWpVersion)("6.1",">=")){let e;f.b&&!e&&(e=Object(d.subscribe)((()=>{I((()=>{e&&e()}))}),"core/block-editor"))}c(533);var F=c(331);const R=["woocommerce/woocommerce//archive-product","woocommerce/woocommerce//taxonomy-product_cat","woocommerce/woocommerce//taxonomy-product_tag","woocommerce/woocommerce//taxonomy-product_attribute","woocommerce/woocommerce//product-search-results"],$=e=>{Object(O.registerBlockVariation)(f.i,{description:Object(l.__)("A block that displays a selection of products in your store.","woocommerce"),name:f.g,
/* translators: “Products“ is the name of the block. */
title:Object(l.__)("Products (Beta)","woocommerce"),isActive:e=>e.namespace===f.g,icon:Object(i.createElement)(g.Icon,{icon:F.a,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:{...e,namespace:f.g},allowedControls:f.c,innerBlocks:f.e,scope:["inserter"]})};if(Object(r.isWpVersion)("6.1",">=")){let e;Object(d.subscribe)((()=>{const t=e,c=Object(d.select)("core/edit-site");if(e=null==c?void 0:c.getEditedPostId(),t!==e&&Object(j.a)(c)){const t=R.includes(e),c={inherit:t};t&&(c.perPage=Object(r.getSettingWithCoercion)("loopShopPerPage",12,m.a));const o={...f.h,query:{...f.h.query,...c}};Object(O.unregisterBlockVariation)(f.i,f.g),$(o)}}),"core/edit-site");let t=!1;Object(d.subscribe)((()=>{t||(t=!0,$(f.h))}),"core/edit-post")}c(368);const V=[a.a,s.a,n.a];Object(r.isWpVersion)("6.1",">=")&&Object(o.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",(function(e,t){return V.includes(t)&&(e.attributes={...e.attributes,__woocommerceNamespace:{type:"string"}}),e}))},57:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=(e,t)=>e.reduce(((e,c)=>(e[String(t?c[t]:c)]=c,e)),{})},6:function(e,t){e.exports=window.wp.data},60:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));let o=function(e){return e.SINGLE="single",e.THUMBNAIL="thumbnail",e}({})},66:function(e,t,c){"use strict";c.d(t,"c",(function(){return s})),c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var o=c(0),r=c(1),n=c(70),a=c(166);const s=Object(r.__)("Product Title","woocommerce"),i=Object(o.createElement)(n.a,{icon:a.a,className:"wc-block-editor-components-block-icon"}),l=Object(r.__)("Display the title of a product.","woocommerce")},7:function(e,t){e.exports=window.wp.blocks},73:function(e,t,c){"use strict";var o=c(0),r=c(2),n=c(35),a=c(4),s=c.n(a);t.a=({className:e,item:t,isSelected:c,isLoading:a,onSelect:i,disabled:l,...u})=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(n.a,{...u,key:t.id,className:e,isSelected:c,item:t,onSelect:i,disabled:l}),c&&a&&Object(o.createElement)("div",{key:"loading",className:s()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(o.createElement)(r.Spinner,null)))},76:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(7);function r(e,{blockDescription:t,blockIcon:c,blockTitle:r,variationName:n}){Object(o.registerBlockVariation)(e,{description:t,name:n,title:r,isActive:e=>e.__woocommerceNamespace===n,icon:{src:c},attributes:{__woocommerceNamespace:n},scope:["block","inserter"]})}},80:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"boolean"==typeof e},84:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>"number"==typeof e},87:function(e,t,c){"use strict";c.d(t,"c",(function(){return s})),c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var o=c(0),r=c(1),n=c(70),a=c(198);const s=Object(r.__)("Product Summary","woocommerce"),i=Object(o.createElement)(n.a,{icon:a.a,className:"wc-block-editor-components-block-icon"}),l=Object(r.__)("Display a short description about a product.","woocommerce")},89:function(e,t,c){"use strict";c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l}));var o=c(0),r=c(2),n=c(66),a=c(166),s=c(76);const i="core/post-title",l="woocommerce/product-query/product-title";Object(s.a)(i,{blockDescription:n.a,blockIcon:Object(o.createElement)(r.Icon,{icon:a.a}),blockTitle:n.c,variationName:l})},9:function(e,t){e.exports=window.wp.primitives}});